home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / T2WIN-32.ZIP / _ISX.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-01  |  7.7 KB  |  228 lines

  1. VERSION 4.00
  2. Begin VB.Form frmIsX 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "IsX"
  5.    ClientHeight    =   4485
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7485
  9.    Height          =   4890
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4485
  14.    ScaleWidth      =   7485
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2925
  17.    Width           =   7605
  18.    Begin Threed.SSPanel SSPanel2 
  19.       Align           =   2  'Align Bottom
  20.       Height          =   465
  21.       Left            =   0
  22.       TabIndex        =   1
  23.       Top             =   4020
  24.       Width           =   7485
  25.       _Version        =   65536
  26.       _ExtentX        =   13203
  27.       _ExtentY        =   820
  28.       _StockProps     =   15
  29.       BackColor       =   12632256
  30.       Begin VB.TextBox Text1 
  31.          Height          =   285
  32.          Left            =   1440
  33.          TabIndex        =   2
  34.          Tag             =   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  35.          Top             =   90
  36.          Width           =   5055
  37.       End
  38.       Begin VB.Label Label1 
  39.          Caption         =   "&Enter a test string"
  40.          Height          =   255
  41.          Left            =   90
  42.          TabIndex        =   4
  43.          Top             =   120
  44.          Width           =   1275
  45.       End
  46.       Begin Threed.SSCommand SSCommand2 
  47.          Height          =   285
  48.          Left            =   6570
  49.          TabIndex        =   3
  50.          Top             =   90
  51.          Width           =   825
  52.          _Version        =   65536
  53.          _ExtentX        =   1455
  54.          _ExtentY        =   503
  55.          _StockProps     =   78
  56.          Caption         =   "&Reset"
  57.          BevelWidth      =   1
  58.          Outline         =   0   'False
  59.       End
  60.    End
  61.    Begin Threed.SSPanel SSPanel1 
  62.       Align           =   1  'Align Top
  63.       Height          =   480
  64.       Left            =   0
  65.       TabIndex        =   5
  66.       Top             =   0
  67.       Width           =   7485
  68.       _Version        =   65536
  69.       _ExtentX        =   13203
  70.       _ExtentY        =   847
  71.       _StockProps     =   15
  72.       ForeColor       =   -2147483640
  73.       BackColor       =   12632256
  74.       Begin VB.ComboBox cmb_Function 
  75.          Height          =   315
  76.          Left            =   1365
  77.          TabIndex        =   6
  78.          Top             =   90
  79.          Width           =   4785
  80.       End
  81.       Begin Threed.SSCommand cmdNP 
  82.          Height          =   300
  83.          Index           =   1
  84.          Left            =   7140
  85.          TabIndex        =   10
  86.          Top             =   90
  87.          Width           =   255
  88.          _Version        =   65536
  89.          _ExtentX        =   450
  90.          _ExtentY        =   529
  91.          _StockProps     =   78
  92.          Caption         =   ">"
  93.          BevelWidth      =   1
  94.          Font3D          =   3
  95.          RoundedCorners  =   0   'False
  96.          Outline         =   0   'False
  97.       End
  98.       Begin Threed.SSCommand cmdNP 
  99.          Height          =   300
  100.          Index           =   0
  101.          Left            =   6300
  102.          TabIndex        =   9
  103.          Top             =   90
  104.          Width           =   255
  105.          _Version        =   65536
  106.          _ExtentX        =   450
  107.          _ExtentY        =   529
  108.          _StockProps     =   78
  109.          Caption         =   "<"
  110.          BevelWidth      =   1
  111.          Font3D          =   3
  112.          RoundedCorners  =   0   'False
  113.          Outline         =   0   'False
  114.       End
  115.       Begin VB.Label Label2 
  116.          Caption         =   "&Select a function"
  117.          Height          =   255
  118.          Left            =   90
  119.          TabIndex        =   8
  120.          Top             =   120
  121.          Width           =   1275
  122.       End
  123.       Begin Threed.SSCommand SSCommand1 
  124.          Default         =   -1  'True
  125.          Height          =   300
  126.          Left            =   6615
  127.          TabIndex        =   7
  128.          Top             =   90
  129.          Width           =   465
  130.          _Version        =   65536
  131.          _ExtentX        =   820
  132.          _ExtentY        =   529
  133.          _StockProps     =   78
  134.          Caption         =   "&Go"
  135.          BevelWidth      =   1
  136.          RoundedCorners  =   0   'False
  137.          Outline         =   0   'False
  138.       End
  139.    End
  140.    Begin VB.Label lbl_Result 
  141.       Appearance      =   0  'Flat
  142.       BackColor       =   &H80000005&
  143.       BackStyle       =   0  'Transparent
  144.       ForeColor       =   &H80000008&
  145.       Height          =   3270
  146.       Left            =   90
  147.       TabIndex        =   0
  148.       Top             =   630
  149.       Width           =   7305
  150.    End
  151. Attribute VB_Name = "frmIsX"
  152. Attribute VB_Creatable = False
  153. Attribute VB_Exposed = False
  154. Option Explicit
  155. Option Base 1
  156. Private Const Iteration = 250
  157. Dim IsLoaded         As Integer
  158. Dim TimerStartOk     As Integer
  159. Dim TimerCloseOk     As Integer
  160. Dim TimerHandle      As Integer
  161. Dim TimerValue       As Long
  162. Private Sub cmdNP_Click(Index As Integer)
  163.    Call sub_NextPrev(cmb_Function, Index)
  164. End Sub
  165. Private Sub cmb_Function_Click()
  166.    If (IsLoaded = False) Then Exit Sub
  167.    Call cDisableFI(mdiT2W.Picture1)
  168.    lbl_Result = ""
  169.    DoEvents
  170.    Select Case cmb_Function.ListIndex
  171.       Case 0
  172.          Call TestIsX
  173.    End Select
  174.    DoEvents
  175.    Call cEnableFI(mdiT2W.Picture1)
  176. End Sub
  177. Private Sub Form_Activate()
  178.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  179. End Sub
  180. Private Sub Form_Load()
  181.    IsLoaded = False
  182.    Show
  183.    Text1.Text = Text1.Tag + LCase$(Text1.Tag)
  184.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_isx.t2w")
  185.    IsLoaded = True
  186. End Sub
  187. Private Sub SSCommand1_Click()
  188.    Call cmb_Function_Click
  189. End Sub
  190. Private Sub TestIsX()
  191.    Dim intResult        As Integer
  192.    Dim strResult        As String
  193.    Dim strDisplay       As String
  194.    Dim i                As Integer
  195.    Dim Str1             As String
  196.    strResult = ""
  197.    strDisplay = ""
  198.    Str1 = Text1.Text
  199.    strDisplay = "[" & Str1 & "] is " & vbCrLf & vbCrLf
  200.    strDisplay = strDisplay & IIf(cIsDigit(Str1), "Digit", " not Digit") & vbCrLf
  201.    strDisplay = strDisplay & IIf(cIsXdigit(Str1), "XDigit", " not XDigit") & vbCrLf
  202.    strDisplay = strDisplay & IIf(cIsAlpha(Str1), "Alpha", " not Alpha") & vbCrLf
  203.    strDisplay = strDisplay & IIf(cIsLower(Str1), "Lower", " not Lower") & vbCrLf
  204.    strDisplay = strDisplay & IIf(cIsUpper(Str1), "Upper", " not Upper") & vbCrLf
  205.    strDisplay = strDisplay & IIf(cIsAlnum(Str1), "Alnum", " not Alnum") & vbCrLf
  206.    strDisplay = strDisplay & IIf(cIsUpper(Str1), "Upper", " not Upper") & vbCrLf
  207.    strDisplay = strDisplay & IIf(cIsSpace(Str1), "Space", " not Space") & vbCrLf
  208.    strDisplay = strDisplay & IIf(cIsPunct(Str1), "Punct", " not Punct") & vbCrLf
  209.    strDisplay = strDisplay & IIf(cIsAscii(Str1), "Ascii", " not Ascii") & vbCrLf
  210.    strDisplay = strDisplay & IIf(cIsCsym(Str1), "Csym", " not Csym") & vbCrLf
  211.    strDisplay = strDisplay & IIf(cIsCsymf(Str1), "Csymf", " not Csymf") & vbCrLf
  212.    strDisplay = strDisplay & IIf(cIsISBN(Str1), "ISBN", " not ISBN") & vbCrLf & vbCrLf
  213.      
  214.    lbl_Result = strDisplay
  215.    'time the function
  216.    TimerHandle = cTimerOpen()
  217.    TimerStartOk = cTimerStart(TimerHandle)
  218.    For i = 1 To Iteration
  219.       intResult = cIsDigit(Str1)
  220.    Next i
  221.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  222.    TimerCloseOk = cTimerClose(TimerHandle)
  223. End Sub
  224. Private Sub SSCommand2_Click()
  225.    Text1.Text = Text1.Tag + LCase$(Text1.Tag)
  226.    Call SSCommand1_Click
  227. End Sub
  228.